//zasddasdasdasdasdasd
//zaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author fenge
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring-rabbitmq.xml")
public class ConsumerTest {
    @Autowired
    RabbitTemplate rabbitTemplate;


    @Test
    public void test1(){
        String message="hello spring rabbitMQ";
        rabbitTemplate.convertAndSend("","spring_simple_queue",message);

    }
    @Test
    public void test2(){
        String message="hello spring rabbitMQ fanout";
        rabbitTemplate.convertAndSend("spring_fanout_ex","",message);

    }
    @Test
    public void test3(){
        String message="hello spring rabbitMQ topic";
        rabbitTemplate.convertAndSend("spring_topic_ex","topic.hello.a",message);

    }

}
